cmake_minimum_required(VERSION 3.18)

project(Sirtet
    VERSION 0.0.1 
    DESCRIPTION "Inverse Tetris"
    LANGUAGES CXX)

find_package(SDL2)
find_package(SDL2_image)

aux_source_directory(core SRC_LIST)
aux_source_directory(gameplay SRC_LIST)

if(UNIX)
    aux_source_directory(platforms/linux SRC_LIST)
elseif(WIN32)
    aux_source_directory(platforms/win32 SRC_LIST)
endif()

add_executable(${PROJECT_NAME} ${SRC_LIST})
target_include_directories(${PROJECT_NAME} PUBLIC core)
target_include_directories(${PROJECT_NAME} PUBLIC gameplay)
target_link_libraries(${PROJECT_NAME} PUBLIC SDL2 SDL2main SDL2_image)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_EXTENSIONS OFF)